from odoo import fields, models, api


class SpecialCustomer(models.Model):  # not use
    _name = 'special.customer'
    _description = 'special.customer'
    _rec_name = 'company_name'

    company_name = fields.Char(string="Company Name")
    contacts = fields.Char(string="Contacts")
    position = fields.Char(string="Position")
    gender = fields.Selection([
        ('male', 'Male'),
        ('female', 'Female')
    ], string="Gender", default='male')
    phone_number = fields.Char(string="Phone Number")
    email = fields.Char(string="Email")
    company_number = fields.Char(string="Company Number")
    social_media_account = fields.Char(string="Social Media Account")
    bring_fields = fields.Char(string="card", compute="_compute_bring_fields")

    @api.depends('contacts', 'phone_number')
    def _compute_bring_fields(self):
        for rec in self:
            if rec.contacts and rec.phone_number:
                rec.bring_fields = rec.contacts + rec.phone_number
            else:
                rec.bring_fields = " "
